

# on wake up normal variables
WIFE_HOME			string		Note: Do not use anymore. Used to be the full path to wife home directory / folder. Now it's one step up from the wife system folder.
HOME_PATH			string		The full path to wife home directory / folder (the base directory of the installed application).
SYSTEM_PATH			string		The full path to wife system directory / folder.
WIFE_RELEASE_VERSION		integer		release version
WIFE_BETA_VERSION		integer		beta version (99=release)
WIFE_SP_VERSION			integer 	service pack version
SESSION				id		a session number used to tell wife when the script can exit


# specific variables of interest
OPERATION			string		new, modify, or remove
CONTACT_ID			id		id of the object
CONTACT_DATA			list		the full list of data
ORIG_CONTACT_DATA		list		the old full list of data BEFORE it was changed, or -1 if OPERATION is "new"





## CONTACTS
0	id			int		a click with date
1	last			string		Linden
2	first			string		Mads
3	title			string		Jerk
4	company			string		Pettersson Akerlund AB
5	email			string		martin@farmerswife.com
6	www			string		www.farmerswife.com
7	other			string		other entry
8	note			string		note for the user
9	address			string		note for the user
10	tel_home		string		telephone home
11	tel_work		string		telephone work
12	tel_mobil		string		telephone mobil
13	fax			string		fax num
14	resource		bool		if it is a resource
15	nickname		string		DataMax
16	rate1			int		the buy rate in money
17	rate2			int		the sell rate in money
18	daybased		bool		if the rate should be day based
19	group			string		the group he is attached to, if any
20	icon			string		"user1" the icon name
21	client			bool		if it is a client
22	number			int		the number of the client
23	http			int		if http access allowed
24	login			string		DataMax
25	password		string		0
26	d_users			int		discount users
27	d_rooms			int		discount rooms
28	d_machines		int		discount machines
29	d_others		int		discount others
30	d_groups		int		discount rooms
31	d_material		int		discount rooms
32	d_service		int		discount rooms
33	cat			string		Category
34	privat			string		if an id exists it should only be should to that id
35	d_labs			int		discount labs
36	d_resources		int		discount resources
37	client_id		int		3.2 client id
38	history			int		3.2 history, each, 0=general 1=http 2=ftp 3=custom 4=todo
39	customs			int		3.2 customs
40	client_color		string		3.2 client color
41	d_orders		int		3.2 discount orders
42	tel_direct		string		3.2 telephone direct
43	classes			int		3.2 class
44	ref			int		3.2 ref number
45	cc_company_id		int		3.2 company id
46	book_perm		list		3.2 perm per obj
47	con_fileaccess		list		3.3 see con_fileaccess
48	activities		list		3.3 see activities
49	aux_rate1		int		3.3 hack to simulate default rates for hour/day, SWAPPING VARS IS USED HERE
50	aux_rate2		int		3.3 hack to simulate default rates for hour/day, SWAPPING VARS IS USED HERE
51	ratecards		list		3.3 rate cards
52	remind_note		string		3.3 like ac remind notes
53	cc_vat			string		4.0 if !EMPTY = what what TAX to use when invoicing this customer
54	cc_vat_name		string		4.0 if !EMPTY = what what TAX NAME to use when invoicing this customer
55	cc_inv_template		string		4.0 if !EMPTY = what what PRINT TEMPLATE to use when invoicing this customer
56	cc_max_credit		string		4.0 if !EMPTY = the maximum credit limit for this customer
57	supplier_list		string		4.0 a list exists if the contact is an object supplier, eg external obj, see supplier_list
58	normal_time_in		rate		4.0, start of a normal working day
59	normal_time_out		rate		4.0, stop of a normal working day
60	normal_time_dur		rate		4.0, dur of a normal day
61	work_rosters		list		4.0, see work_rosters
62	accessories		list		4.0, see accessories
63	ot_rates		rate		4.0, if not empty then overtime buy (0) and sell (1) rates, only for USERS AND RESOURCES


# supplier_list
0	id		click
1	class_id
2	buy
3	sell
4	daybased
5	quant_rates
6	ref



# con_fileaccess
0	cf_active		bool		
1	cf_user_name		string		
2	cf_password		string		
3	cf_projects		list		
4	cf_libraries		list		
5	cf_customs		list		name of custom, the label's name
6	cf_allow_ftp		bool


## advanced history used by company and contacts histories

# general 0
0	type			int		0=general 1=http 2=ftp 3=custom 4=todo
1	id			int		a click with date
2	owner			list		0=id 1=short 2=icon 
3	action			string		what happened string


# http 1 / ftp 2
0	type			int		0=general 1=http 2=ftp 3=custom 4=todo
1	id			int		a click with date
2	owner			list		0=id 1=short
3	action			string		what happened string


# custom = 3
0	type			int		0=general 1=http 2=ftp 3=custom 4=todo
1	id			int		a click with date
2	lastid			int		last, a click with date
3	owner			list		0=id 1=short 2=icon 
4	lastowner		list		last, 0=id 1=short 2=icon 
5	action			string		what happened string
6	action_icon		string		icon of custom
7	note			string		a note

# todo = 4
0	type			int		0=general 1=http 2=ftp 3=custom 4=todo
1	id			int		a click with date
2	lastid			int		last, a click with date
3	owner			list		0=id 1=short 2=icon 
4	lastowner		list		last, 0=id 1=short 2=icon 
5	action			string		what happened string
6	action_icon		string		icon of custom
7	note			string		a note
8	assigned_to		list		0=id 1=short 2=icon
9	done			string		boolean



